package com.xieyunjie.controller;

import javax.servlet.*;
import java.io.IOException;

/**
 * @program: 0812springboot
 * @author: 雷哥
 * @create: 2019-12-17 11:32
 **/

public class AppFilter implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        String env = filterConfig.getInitParameter("env");
        String hello = filterConfig.getInitParameter("hello");
        System.out.println(env+"  "+hello);
    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        System.out.println("doFilter");
        chain.doFilter(request,response);
    }

    @Override
    public void destroy() {

    }
}
